package com.authine.cloudpivot.ext.enums.kingdee;

/**
 * @Author: 李国祥
 * @Date: 2019/11/29 8:58
 * @Version 1.0
 */
public enum KingDeeArchitectureCateEnum {
    PM(0, "云平台"),
    VENDOR(1, "供应商"),
    CUSTOMER(2, "客户");

    public Number code;
    public String des;

    KingDeeArchitectureCateEnum(Number code, String des) {
        this.code = code;
        this.des = des;
    }

    public static KingDeeArchitectureCateEnum  get(Number code) {

        for (KingDeeArchitectureCateEnum c : KingDeeArchitectureCateEnum.values()) {
            if (c.code.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return "code:" + code + ", des:" + des;
    }
}
